/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package managedbeans;

import Entities.Modelerdp;
import Entities.Utilisateur;
import SessionBeans.RdPManager;
import SessionBeans.Users;
import javax.ejb.EJB;
import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Dell
 */
@Named(value = "ajoutMBean")
@SessionScoped
public class AjoutMBean implements Serializable {
    @EJB
    private Users users;
    @EJB
    private RdPManager rdPManager;
    private Modelerdp m = new Modelerdp();
    
    

    /** Creates a new instance of AjoutMBean */
    public AjoutMBean() {
    }
    //Cette ligne montre que le commit a été pris en compte :))))
    private String idm;
    private Date datec;
    private String matricepre;
    private String matricepost;
    private String login;

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }
    
   

    public Date getDatec() {
        return datec;
    }

    public void setDatec(Date datec) {
        this.datec = datec;
    }

    public String getIdm() {
        return idm;
    }

    public void setIdm(String idm) {
        this.idm = idm;
    }

    public String getMatricepost() {
        return matricepost;
    }

    public void setMatricepost(String matricepost) {
        this.matricepost = matricepost;
    }

    public String getMatricepre() {
        return matricepre;
    }

    public void setMatricepre(String matricepre) {
        this.matricepre = matricepre;
    }
    public String saveModeleRDP()
    {
        m = rdPManager.savemodel(login, idm, datec, matricepre, matricepost);
        return "ModeleRDP";
    }
}

